<template>
  <div class="ex1-alert">
    <Modal v-model="alertShow">
      {{message}} {{alertTip}}
    </Modal>
  </div>
</template>
<script>
export default {
  name: 'ex1Alert',
  frameSlot: 'global',
  data() {
    return {
      message: '局部组件的内容'
    }
  },
  computed: {
    alertShow: {
      get () {
        let r = this.$store ? this.$store.state.ex1.alertShow : false
        return r
      },
      set (v) {
        this.$store.commit('ex1/changeAlertShow', v)
      }
    },
    alertTip() {
      let r = this.$store ? this.$store.state.ex1.alertTip : ''
      return r
    }
  }
}
</script>

